<template>
  <div>
    <div>
      <button @click="reset">重置</button>
      <button>关闭</button>
    </div>
    <div id="captcha"></div>
  </div>
</template>

<script setup>
import "../vendor/longbow.slidercaptcha.min.js";
import "../vendor/slidercaptcha.min.css";
import { ref, onMounted } from "vue";
let captcha = null;
onMounted(() => {
  captcha = sliderCaptcha({
    // 这里的id和上面的结构要相对应
    id: "captcha",
    onSuccess() {
      console.log("success");
    },
    onFail() {
      console.log("success");
    },
    verify() {
      // 默认的认证行为
      return true;
    },
  });
});
</script>

<style lang="scss" scoped></style>
